/**
 *
 * 
 * @author APT 
 * 
 * */
package com.orange.delivery.presentation.util;

import java.util.Date;

public class DateUtil {

	// class should not be instantiated
	private DateUtil() {
	}

	/**
	 * Get a copy of a date to avoid exposing internal representation by incorporating reference to mutable object
	 * 
	 * @param aDate
	 * @return a copy of aDate
	 */

	public static Date getSafeDate(Date aDate) {
		Date result = null;

		if (aDate != null) {
			result = new Date(aDate.getTime());
		}
		return result;
	}

}
